package com.bawei.library_mvi.ui

import androidx.databinding.ViewDataBinding
import com.bawei.library_mvi.IView

/**
 * @Author : yaotianxue
 * @Time : On 2023/6/19 16:34
 * @Description : BaseMviLazyFragment
 */
abstract class BaseMviLazyFragment<VDB: ViewDataBinding>:BaseFragment<VDB>(),IView {

    abstract fun generateViewModel()//返回viewmodel
    override fun initEnv() {
        super.initEnv()
        generateViewModel()
    }
    override fun onResume() {
        super.onResume()
        //懒加载数据
        initData()
        //处理状态
        handleState()

    }
}